[% page.title = 'API Method: matches list' 
   page.tab = 'api'
%]

<h2>GET /:user_id/matches</h2>
<p>Returns a list of matches folders with a 200 OK HTTP status code.</p>

<h3>URL:</h3>
<code>[% site.url %]/<em>user_id</em>/matches.<em>format</em></code>

<h3>Formats (<a href="formats">about return formats</a>):</h3>
<code>[% INCLUDE 'api/_formats.phtml' %]</code>

<h3>HTTP Methods (<a href="http-methods">about HTTP methods</a>):</h3>
<code>GET</code>

<h3>Requires Authentication (<a href="authentication">about authentication</a>):</h3>
<code>true</code> &nbsp;if folder's <code>mode</code> property is set to <code>private</code><br/>
<code>false</code> &nbsp;if folder's <code>mode</code> property is set to <code>public</code>

<h3>Parameters:</h3>
<ul>
<li><code>sort</code>.  Optional. Number of the term data column to sort the returned <code>term</code> statistics on.
Numeric data columns are sorted in descending order. Textual data columns are sorted in ascending alphabetical order.
Values of <code>sort</code> must be one of:
<ul>
<li><code>0</code> for <code>name</code>, the term name (i.e. the text of the word or keyword)</li>
<li><code>1</code> for <code>n</code>, the term occurrences (i.e. the total number of times a term occurs across all items in the document)</li>
<li><code>2</code> for <code>dt</code>, the document term count (i.e. the total number items in the document in which the term occurs)</li>
</ul>
The default when no value is supplied is <code>2</code>.
</li>
<li><code><em>full</em></code>.  Optional. Whether to include the <code>term</code> data in the returned representation of the folder of the profiles folder.
Values can be either <code>1</code> for true or <code>0</code> for false. The default is <code>0</code>.
<ul>
<li>Example: <code>[% site.url %]/kdd09/profiles.xml</code></li>
</ul>
</li>
</ul>

<h3>Usage Examples:</h3>
<blockquote>
<h4>cURL (<a href="curl">about cURL</a>):</h4>
<code>curl [% site.url %]/kdd09/matches.xml</code><br/>
</blockquote>

<h3>Response (<a href="return-values">about return values</a>):</h3>
<blockquote>
<h4>XML example:</h4>
<pre>[% FILTER html -%]
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <folder>
    <id>pc_papers</id>
    <created>1267965675</created>
    <description></description>
    <limit>1000</limit>
    <mode>private</mode>
    <modified>1267965675</modified>
    <profiles_id1>pc</profiles_id1>
    <profiles_id2>papers</profiles_id2>
    <threshold>0</threshold>
  </folder>
  <folder>
    <id>reviewers_abstracts</id>
    <created>1267964676</created>
    <description></description>
    <limit>250</limit>
    <mode>private</mode>
    <modified>1268566203</modified>
    <profiles_id1>reviewers</profiles_id1>
    <profiles_id2>abstracts</profiles_id2>
    <threshold>0.0001</threshold>
  </folder>
  .
  .
  .
  <folder>
    <id>m1</id>
    <created>1267964909</created>
    <description></description>
    <limit>10</limit>
    <mode>public</mode>
    <modified>1268599231</modified>
    <profiles_id1>p1</profiles_id1>
    <profiles_id2>p2</profiles_id2>
    <threshold>0</threshold>
  </folder>
</result>
[% END %]</pre>
</blockquote>

